'use strict';
module.exports = (sequelize, DataTypes) => {
  const CorporateEntity = sequelize.define('CorporateEntity', {
    name: DataTypes.STRING
  }, {});
  CorporateEntity.associate = function(models) {
    // associations can be defined here
    CorporateEntity.hasMany(models.Car);
    CorporateEntity.belongsToMany(models.User, {through: 'CorporateEntityUser'});
    CorporateEntity.belongsTo(models.CorporateEntityCategory);
    CorporateEntity.belongsTo(models.CarFence);

  };
  return CorporateEntity;
};